let cr = this.get_context();
let themeNode = this.get_theme_node();
let [width, height] = this.get_surface_size();
+ const rtl = this.get_text_direction() === Clutter.TextDirection.RTL;
let handleRadius = themeNode.get_length('-slider-handle-radius');
themeNode.lookup_color('-slider-handle-border-color', false);
const ceiledHandleRadius = Math.ceil(handleRadius + handleBorderWidth);
- const handleX = ceiledHandleRadius +
- (width - 2 * ceiledHandleRadius) * this._value / this._maxValue;
const handleY = height / 2;
+ let handleX = ceiledHandleRadius +
+ (width - 2 * ceiledHandleRadius) * this._value / this._maxValue;
+ if (rtl)
+ handleX = width - handleX;
+
let color = themeNode.get_foreground_color();
Clutter.cairo_set_source_color(cr, color);
cr.arc(handleX, handleY, handleRadius, 0, 2 * Math.PI);
_moveHandle(absX, _absY) {
let relX, sliderX;
[sliderX] = this.get_transformed_position();
+ const rtl = this.get_text_direction() === Clutter.TextDirection.RTL;
+ let width = this._barLevelWidth;
+
relX = absX - sliderX;
+ if (rtl)
+ relX = width - relX;
- let width = this._barLevelWidth;
let handleRadius = this.get_theme_node().get_length('-slider-handle-radius');
let newvalue;